#ifndef FIELDINFO_H
#define FIELDINFO_H
/*
field_info {
  u2 access_flags;
  u2 name_index;
  u2 signature_index;
  u2 attributes_count;
  attribute_info attributes[attribute_count];
}*/

#include <vector>
#include "jtypes.h"

class AttributeInfo;
class ConstantPool;

class FieldInfo 
{
  public:
    FieldInfo(ConstantPool * cp, FILE *f);

    void dump(ConstantPool *);

    void save(FILE *f);

  private:
    u2 access_flags;
    u2 name_index;
    u2 signature_index;
    std::vector<AttributeInfo*> attributes;

    ConstantPool * constantPool;
};

#endif
